﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Areas/Admin/Views/Shared/Admin.Master" Inherits="System.Web.Mvc.ViewPage<BlogPlat.Model.Tag>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Edit Tag - BlogPlat.NET - .NET Blogging Platform
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="HeadContent" runat="server">
    <script language="javascript" type="text/javascript">
        $(document).ready(function () {
            $("#TagName").focusout(function () {
                $("#FriendlyUrl").val($("#TagName").val().split(' ').join('-').toLowerCase());
            });
        });
    </script>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Editing Tag: <%: Model.TagName %></h2>

   <% Html.EnableClientValidation(); %>
    <% using (Html.BeginForm()) {%>
        <%: Html.ValidationSummary(true) %>                                              
            <%: Html.HiddenFor(model => model.TagID) %>
            <table cellspacing="1" width="1000">
                <tr>
                    <th class="alignleft" colspan="3">
                        <%: Html.ActionLink("Back to List", "index") %>
                    </th>
                </tr>                
                <tr class="even">
                    <td align="left" colspan="3"><b><%: Html.LabelFor(model => model.TagName) %></b></td>
                </tr>
                <tr>
                    <td align="left" colspan="3">
                        <%: Html.TextBoxFor(model => model.TagName, new { @class = "textbox" })%>
                        <%: Html.ValidationMessageFor(model => model.TagName) %>
                    </td>
                </tr>
                <tr class="even">
                    <td align="left" colspan="3"><b><%: Html.LabelFor(model => model.FriendlyUrl) %></b></td>
                </tr>
                <tr>
                    <td align="left" colspan="3">
                        <%: Html.TextBoxFor(model => model.FriendlyUrl, new { @class = "textbox" })%>
                        <%: Html.ValidationMessageFor(model => model.FriendlyUrl) %>
                    </td>
                </tr>                                                         
                <tr>
                    <td align="left" colspan="3">
                        <input type="submit" value="Save" />
                    </td>
                </tr>               
              </table>                 
    <% } %> 

</asp:Content>
